<!DOCTYPE html>
<!--
Author: zouy
Unit: D9lab
Date: 2018-08-23 19:45 
-->
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>title</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="https://cdn.bootcss.com/angular.js/1.5.0/angular.min.js"></script>
    <script src="https://cdn.bootcss.com/angular-file-upload/2.5.0/angular-file-upload.min.js"></script>
</head>
<body>
<script>
    /*var line = readline();
     var n = parseInt(line);*/
    n = 2;
    var result = "";
    var left = "", right = "";
    //初始化
    (function () {
        for (var i = 0; i < n; i++) {
            left += "0";
            right += "0";
        }
    })();
    var changeStr = function (allstr, start, end, changeStr) {
        return allstr.substring(0, start - 1) + changeStr + allstr.substring(end, allstr.length);
    };

    var incr = function (s) {
        let p = s.length - 1;
        while (s[p] == '1') --p;
        //s[p] = '1';
        s = changeStr(s, p, p, '0');
        for (let i = p + 1; i < s.length; ++i) {
            //s[i] = '0';
            s = changeStr(s, i, i, '0');
        }
        return s;
    };

    var func = function (n) {
        for (let i = 0; i < ((1 << n) - 1); ++i) {
            console.log(incr(left));
        }
    };
    func(2);

    /*var recursion = function (num, left, right) {
     if(num > n){
     return;
     }
     result += left + right + " ";
     //改变1的位置 从左至右
     if(){

     }

     if(sum(left) === n){
     num++;
     }
     recursion(num, left, right);//num表示1的个数0 - n
     };
     recursion(0, left, right);
     console.log(result.trim());*/
</script>
</body>
</html>